(use-package cmake-mode
  :ensure)
(require 'cmake-mode)
(setq auto-mode-alist
      (append '(("CMakeLists\\.txt\\'" . cmake-mode)) auto-mode-alist))

(defun starsoul-cmake-mode-hook ()
  (setq tab-width 2)
  (setq indent-tabs-mode nil)
  (define-key cmake-mode-map [?\C-i] 'starsoul-tab))
(add-hook 'cmake-mode-hook 'starsoul-cmake-mode-hook)

(provide 'init_cmake-mode)
